<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <title>鲁班 - 菜单新增/修改</title>
        <!--[if lt IE 9]>
            <meta http-equiv="refresh" content="/ie" />
        <![endif]-->
        <link rel="shortcut icon" href="favicon.ico">
	    <link th:href="@{/components/bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet">
		<link th:href="@{/components/font-awesome/4.6.3/css/font-awesome.min.css}" rel="stylesheet">
	    <link th:href="@{/css/animate.min.css}" rel="stylesheet">
	    <link th:href="@{/css/style.css}" rel="stylesheet">
        <style>
	        .icon-cc li{list-style:none;}
	        .icon-cc li:hover,.icon-cc li.chose{background:#fe8}
        </style>
    </head>
    <body>
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <form class="form-horizontal m-t" id="form1">
					<input th:if="${item ne null}" type="hidden" name="id" th:value="${item?.id}" />
					<input th:if="${item ne null}" type="hidden" name="version" th:value="${item?.version}" />
					<input th:unless="${item ne null}" type="hidden" name="pid" th:value="${pid}" />
					<input th:unless="${item ne null}" type="hidden" name="sortNo" th:value="${sort}" />
					<div class="form-group">
                        <label class="col-sm-3 control-label">资源名称：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="name" name="name" placeholder="请输入资源名称"  th:value="${item?.name}">
                                <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                            </div>
                    </div>
					<div class="form-group">
                        <label class="col-sm-3 control-label">资源地址：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="url" name="url" placeholder="请输入资源地址"  th:value="${item?.url}">
                                <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">资源类型：</label>
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="type" value="1" th:checked="${item eq null} ? 'checked' : ${item?.type == 1}"> <i></i> 菜单
                                </label>
                                <label>
                                    <input type="radio" name="type" value="2" th:checked="${item?.type == 2}"> <i></i> 按钮
                                </label>
                                <label>
                                    <input type="radio" name="type" value="3" th:checked="${item?.type == 3}"> <i></i> 其他
                                </label>
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">资源状态：</label>
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="status" value="0" th:checked="${item eq null} ? 'checked' : ${item?.status == 0}"> <i></i> 禁用
                                </label>
                                <label>
                                    <input type="radio" name="status" value="1" th:checked="${item?.status == 1}"> <i></i> 启用
                                </label>
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">资源请求类型：</label>
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="method" value="0" th:checked="${item eq null} ? 'checked' : ${item?.method == 0}"> <i></i> ALL
                                </label>
                                <label>
                                    <input type="radio" name="method" value="1" th:checked="${item?.method == 1}"> <i></i> GET
                                </label>
                                <label>
                                    <input type="radio" name="method" value="2" th:checked="${item?.method == 2}"> <i></i> POST
                                </label>
                                <label>
                                    <input type="radio" name="method" value="3" th:checked="${item?.method == 3}"> <i></i> PUT
                                </label>
                                <label>
                                    <input type="radio" name="method" value="4" th:checked="${item?.method == 4}"> <i></i> DELETE
                                </label>
                                <label>
                                    <input type="radio" name="method" value="5" th:checked="${item?.method == 5}"> <i></i> OTHER
                                </label>
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">是否展示：</label>
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="isShow" value="0" th:checked="${item eq null} ? 'checked' : ${item?.isShow == 0}"> <i></i> 隐藏
                                </label>
                                <label>
                                    <input type="radio" name="isShow" value="1" th:checked="${item?.isShow == 1}"> <i></i> 展示
                                </label>
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">权限标志：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="permission" name="permission" placeholder="请输入权限标志"  th:value="${item?.permission}">
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 比如：sys:user:list</span>
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">图标：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="icon" name="icon" placeholder="请输入图标"  th:value="${item?.icon}">
                                <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                            </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">备注：</label>
                        <div class="col-sm-8">
                            <textarea name="remark" id="remark" class="form-control" placeholder="说点什么...100个字符以内" dragonfly="true" th:value="${item?.remark}"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-8 col-sm-offset-3">
                            <button class="btn btn-primary" type="submit">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <script type="text/javascript" th:src="@{/js/common/require.min.js}"></script>
		<script type="text/javascript" th:src="@{/js/common/config.js}"></script>
		<script type="text/javascript" th:src="@{/js/module/sys/resource/sys_resource_edit.js}"></script>
    </body>
</html>